import {options} from "@/api/http"

export function getPointLabelList(){
  return options({
    url:"/markPoint/getAllMarkPoints",
    method:'get'
  })
}

export function addPointLabel({geom, name, description, person}){
  return options({
    url:'/markPoint/addMarkPoint',
    method:'post',
    data:{
      geom,
      name,
      description,
      person
    }
  })
}

export function getPointLabelInfo(id){
  return options({
    url:'/markPoint/queryById',
    method:'post',
    data:{
      id
    }
  })
}

export function editPointLabel({field, value, id}){
  return options({
    url:'/markPoint/updateMarkPoint',
    method:'post',
    data:{
      field,
      value,
      id
    }
  })
}

export function delPositionLabel(id){
  return options({
    url:'/markPoint/delete',
    method:'post',
    data:{
      id
    }
  })
}

export function getPointByField({field, value}){
  return options({
    url:'/markPoint/queryByField',
    method:'post',
    data:{
      field,
      value
    }
  })
}


export function getLineList(){
  return options({
    url:'markPolyline/getAllMarkPolylines',
    method:'get'
  })
}


export function addLineField({geom, name, description, person}){
  return options({
    url:'markPolyline/addMarkPolyline',
    method:'post',
    data:{
      geom,
      name,
      description,
      person
    }
  })
}

export function editLineField({field, value, id}){
  return options({
    url:'markPolyline/updateMarkPolyline',
    method:'post',
    data:{
      field,
      value,
      id
    }
  })
}

export function getLineByField({field, value}){
  return options({
    url:"markPolyline/queryByField",
    method:"post",
    data:{
      field,
      value
    }
  })
}

export function getLineById(id){
  return options({
    url:"markPolyline/queryById",
    method:"post",
    data:{
      id
    }
  })
}

export function delLine(id){
  return options({
    url:"markPolyline/delete",
    method:"post",
    data:{
      id
    }
  })
}

export function addPolygonField({geom, name, description, person}){
  return options({
    url:"markPolygon/addMarkPolygon",
    method:"post",
    data:{
      geom,
      name,
      description,
      person
    }
  })
}

export function getPolygonById(id){
  return options({
    url:"markPolygon/queryById",
    method:"post",
    data:{
      id
    }
  })
}

export function getPolygonList(){
  return options({
    url:"markPolygon/getAllMarkPolygons",
    method:"get"
  })
}

export function editPolygonField({field, value, id}){
  return options({
    url:"markPolygon/updateMarkPolygon",
    method:"post",
    data:{
      field,
      value,
      id
    }
  })
}

export function delPolygon(id){
  return options({
    url:"markPolygon/delete",
    method:"post",
    data:{
      id
    }
  })
}

export function getPolygonByField({field, value}){
  return options({
    url:"markPolygon/queryByField",
    method:"post",
    data:{
      field,
      value
    }
  })
}
